package commons.utils.facades;

import org.eclipse.swt.accessibility.AccessibleListener;
import org.eclipse.swt.widgets.Control;

import commons.utils.facades.ControlFacade;
import commons.utils.facades.internal.FacadeFactory;

public abstract class ControlFacade {

    private static final ControlFacade _INSTANCE = FacadeFactory.createFacade(ControlFacade.class);

    public static ControlFacade getDefault() {
        return _INSTANCE;
    }

    public static void addAccessibleListener(Control control, AccessibleListener listener) {
        getDefault().addAccessibleListenerImpl(control, listener);
    }

    public static void removeAccessibleListener(Control control, AccessibleListener listener) {
        getDefault().removeAccessibleListenerImpl(control, listener);
    }

    protected abstract void addAccessibleListenerImpl(Control control, AccessibleListener listener);

    protected abstract void removeAccessibleListenerImpl(Control control, AccessibleListener listener);

}
